package net.huashitong.ssydt.provider.pk.service;


import net.huashitong.ssydt.base.service.LongService;
import net.huashitong.ssydt.pk.entity.SsPkYzddMyRank;

import java.util.List;

/**
 * @author <a href="mailto:yhy23456@163.com">huiyang.yu</a>
 * @since 2017.12.18
 */
public interface SsPkYzddMyRankService extends LongService<SsPkYzddMyRank> {

    /**
     * 获取我的排名（自动更新本轮排名）
     *
     * @param matchRecordId
     * @param userId
     * @return
     */
    SsPkYzddMyRank getAutoUpdateRankByMatchRecordIdWithUserId(Long matchRecordId, String userId);


    /**
     * 获取我的排名(自动加载上轮排名)
     *
     * @param matchRecordId
     * @param userId
     * @return
     */
    SsPkYzddMyRank getAutoLoadLastRankByMatchRecordIdWithUserId(Long matchRecordId, String userId);

    /**
     * 更新本轮排行
     *
     * @param ssPkYzddMyRank
     * @return
     */
    SsPkYzddMyRank updateRank(SsPkYzddMyRank ssPkYzddMyRank);

    SsPkYzddMyRank getByMatchRecordIdWithUserId(Long matchRecordId, String userId);

    List<SsPkYzddMyRank> findHighestScoreDescByMatchRecordId(Long matchRecordId);
}
